#pragma once
#include "pch/std_array.h"
#include "pch/std_iostream.h"
#include "point.h"
#include "circle.h"

#define TRIANGLE_VERTEX_NUMBER 3

namespace BaseGeo {
    class Triangle {
    private:
        Circle circumcircle;
        void buildCircumCircle();
        bool canBeTriangle(const Point& point_a, const Point& point_b, const Point& point_c) const;
    public:
        std::array<Point, TRIANGLE_VERTEX_NUMBER> vertices;

        Triangle();
        Triangle(const Point& point_a, const Point& point_b, const Point& point_c);
        bool IsPointInThis(const Point& point_x) const;
        bool IsPointInCircumCircle(const Point& point_x) const;
        double Area() const;
        const Circle& GetCircumCircle() const;
    };
}

std::ostream& operator<<(std::ostream& stream, const BaseGeo::Triangle& triangle);